package edu.sandau.b230151.b23015135.repository;

import edu.sandau.b230151.b23015135.model.Book;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;


public interface BookRepository extends JpaRepository<Book, String> {
    List<Book> findByName(String name);

    @Query(nativeQuery = true, value = "select * from book where name = ?1")
    List<Book> findByNativeQuery(String name);
}

